﻿using Abp.AutoMapper;
using GN.Pay.Application.Dto.Input;
using GN.Pay.Core.Entities;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GN.Pay.Application.GatewayApp.Dto.Input
{
    /// <summary>
    /// 支付申请输入
    /// </summary>  
    [AutoMap(typeof(TradePayApply))]
    public class PayApplyInput : ServiceBaseInput
    {
        //订单号
        [Required]
        [MaxLength(32)]
        public string OrderNo { get; set; }

        //订单时间
        public DateTime OrderTime { get; set; }

        [Range(0.01, (double)decimal.MaxValue)]
        //订单金额
        public decimal OrderMoney { get; set; }

        /// <summary>
        /// 会员编号
        /// </summary>
        [MaxLength(64)]
        public string MemberNo { get; set; }

        //商品标题
        [Required]
        public string Subject { get; set; }

        //商品详情
        public string Body { get; set; }

        //订单备注
        public string Remark { get; set; }

        /// <summary>
        /// 获取或设置用户标识(如微信 openId等)
        /// </summary>    
        [MaxLength(255, ErrorMessage = "用户标识不能超过 255 位的长度 ")]
        public string UserToken { get; set; }

        //过期分钟
        [Range(0, int.MaxValue)]
        public int ExpireMinute { get; set; }

        //通知地址(Post)
        [MaxLength(255)]
        public string NotifyUrl { get; set; }

        //返回地址(Get)
        [MaxLength(255)]
        public string ReturnUrl { get; set; }        

        //扩展参数
        public string ExtraParam { get; set; }
    }
}
